<template>
  <div>
    展示没绑定学生列表
    <ul>
      <li v-for='i in stulist'>{{i.name}}
        <button @click='bind(i.id)'>绑定</button>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  name:'denglu2',
  data(){
    return{
      stulist:[]
    }
  },
  methods: {
    getStulist(){
      this.axios.get('goods/stuM/').then(res=>{
        this.stulist=res.data.list
      })
    },
    bind(id){
      let tid = localStorage.getItem('tuserid')
      this.axios.put('goods/stuM/?id='+id+'&tid='+tid).then(res=>{

      })
    }
  },
  mounted() {
    this.getStulist()
  },
}
</script>

<style scoped>

</style>
